set(SOURCES
    ${CMAKE_SOURCE_DIR}/include/utils/async.h
    ${CMAKE_SOURCE_DIR}/include/utils/audioutils.h
    ${CMAKE_SOURCE_DIR}/include/utils/crypto.h
    ${CMAKE_SOURCE_DIR}/include/utils/datastream.h
    ${CMAKE_SOURCE_DIR}/include/utils/enum.h
    ${CMAKE_SOURCE_DIR}/include/utils/fileutils.h
    ${CMAKE_SOURCE_DIR}/include/utils/fymath.h
    ${CMAKE_SOURCE_DIR}/include/utils/fypaths.h
    ${CMAKE_SOURCE_DIR}/include/utils/helpers.h
    ${CMAKE_SOURCE_DIR}/include/utils/id.h
    ${CMAKE_SOURCE_DIR}/include/utils/itemregistry.h
    ${CMAKE_SOURCE_DIR}/include/utils/signalthrottler.h
    ${CMAKE_SOURCE_DIR}/include/utils/stareditor.h
    ${CMAKE_SOURCE_DIR}/include/utils/stardelegate.h
    ${CMAKE_SOURCE_DIR}/include/utils/starrating.h
    ${CMAKE_SOURCE_DIR}/include/utils/stringutils.h
    ${CMAKE_SOURCE_DIR}/include/utils/tablemodel.h
    ${CMAKE_SOURCE_DIR}/include/utils/threadqueue.h
    ${CMAKE_SOURCE_DIR}/include/utils/timer.h
    ${CMAKE_SOURCE_DIR}/include/utils/tooltipfilter.h
    ${CMAKE_SOURCE_DIR}/include/utils/treeitem.h
    ${CMAKE_SOURCE_DIR}/include/utils/treemodel.h
    ${CMAKE_SOURCE_DIR}/include/utils/treestatusitem.h
    ${CMAKE_SOURCE_DIR}/include/utils/utils.h
    ${CMAKE_SOURCE_DIR}/include/utils/worker.h
    ${CMAKE_SOURCE_DIR}/include/utils/actions/actioncontainer.h
    ${CMAKE_SOURCE_DIR}/include/utils/actions/actionmanager.h
    ${CMAKE_SOURCE_DIR}/include/utils/actions/command.h
    ${CMAKE_SOURCE_DIR}/include/utils/actions/proxyaction.h
    ${CMAKE_SOURCE_DIR}/include/utils/actions/widgetcontext.h
    ${CMAKE_SOURCE_DIR}/include/utils/database/dbconnection.h
    ${CMAKE_SOURCE_DIR}/include/utils/database/dbconnectionhandler.h
    ${CMAKE_SOURCE_DIR}/include/utils/database/dbconnectionpool.h
    ${CMAKE_SOURCE_DIR}/include/utils/database/dbconnectionprovider.h
    ${CMAKE_SOURCE_DIR}/include/utils/database/dbmodule.h
    ${CMAKE_SOURCE_DIR}/include/utils/database/dbquery.h
    ${CMAKE_SOURCE_DIR}/include/utils/database/dbtransaction.h
    ${CMAKE_SOURCE_DIR}/include/utils/logging/messagehandler.h
    ${CMAKE_SOURCE_DIR}/include/utils/settings/settingsdialogcontroller.h
    ${CMAKE_SOURCE_DIR}/include/utils/settings/settingsentry.h
    ${CMAKE_SOURCE_DIR}/include/utils/settings/settingsmanager.h
    ${CMAKE_SOURCE_DIR}/include/utils/settings/settingspage.h
    audioutils.cpp
    crypto.cpp
    datastream.cpp
    fileutils.cpp
    id.cpp
    itemregistry.cpp
    modelutils.cpp
    modelutils.h
    paths.cpp
    signalthrottler.cpp
    stareditor.cpp
    stardelegate.cpp
    starrating.cpp
    stringutils.cpp
    timer.cpp
    tooltipfilter.cpp
    utils.cpp
    worker.cpp
    actions/actioncontainer.cpp
    actions/actionmanager.cpp
    actions/command.cpp
    actions/menucontainer.cpp
    actions/menucontainer.h
    actions/proxyaction.cpp
    actions/widgetcontext.cpp
    database/dbconnection.cpp
    database/dbconnectionhandler.cpp
    database/dbconnectionpool.cpp
    database/dbconnectionprovider.cpp
    database/dbquery.cpp
    database/dbtransaction.cpp
    logging/logwidget.cpp
    logging/logwidget.h
    logging/logmodel.cpp
    logging/logmodel.h
    logging/messagehandler.cpp
    settings/settingscategory.h
    settings/settingsdialog.cpp
    settings/settingsdialog.h
    settings/settingsdialogcontroller.cpp
    settings/settingsentry.cpp
    settings/settingsmanager.cpp
    settings/settingsmodel.cpp
    settings/settingsmodel.h
    settings/settingspage.cpp
)

create_fooyin_library(
    fooyin_utils
    EXPORT_NAME Utils
    SOURCES ${SOURCES}
)

target_link_libraries(
    fooyin_utils
    PUBLIC Qt6::Core
           Qt6::Widgets
           Qt6::Sql
           Qt6::Concurrent
    PRIVATE ICU::uc
            ICU::i18n
)

target_include_directories(
    fooyin_utils
    PUBLIC ${ICU_INCLUDE_DIRS}
)
